//package com.kingjw
//
//
//
//import java.util
//
//import com.kingjw.spark.HttpUtils
//import org.apache.http.Header
//import org.apache.http.message.BasicHeader
//
//
///**
// *
// * @Package: com.kingjw
// * @ClassName: HttpTest
// * @Author: 王坚伟
// * @CreateTime: 2021/12/6 10:10
// * @Description:
// */
//object HttpTest {
//  def main(args: Array[String]): Unit = {
//
//    val path = "https://host.gis.cn/portal/sharing/rest/generateToken"
//    var map = new util.HashMap[String,String]()
//    map.put("username","admin")
//    map.put("password","admin123")
//    map.put("client","referer")
//    map.put("referer","https://host.gis.cn/ga/rest/services")
//    map.put("expiration","20160")
//    map.put("f","pjson")
//
//    val header: Header = new BasicHeader("Content-Type", "application/x-www-form-urlencoded")
//    val ls: List[Header] = List[Header](header)
//    import scala.collection.JavaConverters._
//    val java: util.List[Header] = ls.asJava
//
//    val result: String = HttpUtils.post(path,map,java)
//    println(result)
//  }
//}
